﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="School.aspx.cs" Inherits="TuyenSinh.Admin.School" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="JS/JSSchool.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="server">
        <div id="center-column">
            
            <div class="top-bar">
				<a href="javascript:void(0)" class="button" id="btnAddNew">ADD NEW </a>
                <a href="javascript:void(0)" class="button" id="btnEdit">EDIT</a>
				<h1>Quản lý các trường</h1>
			</div><br />
            
            <div class="select-bar" id="divBarSearch">
            <label>
            Tên trường
		   <asp:TextBox ID="txtNameSerch" runat="server"></asp:TextBox>
		    </label>

            <asp:DropDownList ID="ddlRegion" runat="server">
            </asp:DropDownList>
           
           Thuộc loại
            <asp:DropDownList ID="ddlType" runat="server">
            </asp:DropDownList>

            Thuộc nhóm
            <asp:DropDownList ID="ddlGroup" runat="server">
            </asp:DropDownList>
           

            <asp:Button ID="btnSubmitCate" runat="server" Text="Search" OnClick="btnSubmitCate_Click" />
          </div>
                   
            <!-- Edit -->
			<div class="table" id="divListItem">

				<%--<img src="Images/bg-th-left.gif" width="8" height="7" alt="" class="left" />
				<img src="Images/bg-th-right.gif" width="7" height="7" alt="" class="right" />--%>

                <asp:GridView ID="grvSchool" CssClass="listing" runat="server" AllowPaging="true" 
                    AllowSorting="true" AutoGenerateColumns="false" PageSize="15" 
                    onrowdatabound="grvImg_RowDataBound" 
                    onpageindexchanging="grvImg_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField HeaderText="Tên Trường" >
                            <ItemTemplate>
                                <asp:TextBox runat="server" ID="txtSchoolName" TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Mô tả">
                            <ItemTemplate>
                                <asp:TextBox Width="100%" ID="txtDesc" runat="server" TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField> 
                        
                         <asp:TemplateField HeaderText="Địa chỉ">
                            <ItemTemplate>
                                <asp:TextBox Width="100%" ID="txtAddress" runat="server" TextMode="MultiLine" Rows="2"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField> 
                        
                        <asp:TemplateField HeaderText="Khu vực">
                            <ItemTemplate>
                                <asp:DropDownList Width="100%" ID="ddlRegionEdit" runat="server" ></asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Loại trường">
                            <ItemTemplate>
                                <asp:DropDownList Width="100%" ID="ddlSchoolTypeEdit" runat="server" ></asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Nhóm trường">
                            <ItemTemplate>
                                <asp:DropDownList Width="100%" ID="ddlSchoolGroupEdit" runat="server" ></asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Active" >
                         <ItemTemplate>
                            <asp:CheckBox ID="ckActive" runat="server" />
                        </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Del" >
                         <ItemTemplate>
                            <asp:CheckBox ID="ckDelete" runat="server" />
                        </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
				
                <div style="text-align:center;padding-top:20px">                    
                    <input type="button" id="btnUpdateImg" value="Update" style="display:none" />
                </div>

				<div class="select" style="display:none">
					<strong>Other Pages: </strong>
					<select>
						<option>1</option>
					</select>
			  </div>

              <script id="ImagesTemplate" type="text/x-jquery-tmpl"> 
                 <tr>
						<td class="first style1">- Lorem Ipsum </td>
						<td><img src="Images/add-icon.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/hr.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/save-icon.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/edit-icon.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/login-icon.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/save-icon.gif" width="16" height="16" alt="save" /></td>
						<td class="last"><img src="Images/add-icon.gif" width="16" height="16" alt="add" /></td>
					</tr>
            </script>
			</div>		
            <!-- End Edit -->
          
            <!-- New -->
            <div class="table" style="display:none" id="divAddNew" >
            
                <table class="tabAdd"  cellpadding="0" cellspacing="0" width="560px">
                    <tr>
                        <td class="title">Name</td>
                        <td class="content"><input type="text" id="txtName" class="textAdd"/></td>
                    </tr>
                    <tr>
                        <td class="title">Description</td>
                        <td class="content"><textarea id="txtDesc" rows="3" cols="60"></textarea></td>
                    </tr>
                    <tr>
                        <td class="title">Region</td>
                        <td class="content"><asp:DropDownList ID="ddlRegionAdd" runat="server">
                                
                        </asp:DropDownList> </td>
                    </tr>
                    
                     <tr>
                        <td class="title">Loại trường</td>
                        <td class="content"><asp:DropDownList ID="ddlSchoolType" runat="server">
                                
                        </asp:DropDownList> </td>
                    </tr>
                    <tr>
                        <td class="title">Thuộc nhóm</td>
                        <td class="content"><asp:DropDownList ID="ddlShoolGroup" runat="server">
                                
                        </asp:DropDownList> </td>
                    </tr>             
                     <tr>
                        <td class="title">Địa chỉ</td>
                         <td class="content"><input type="text"  id="txtAddress" /> </td>
                    </tr>
                   
                     <tr>
                        <td class="title">Active</td>
                        <td class="content"><input type="checkbox" id="ckbActive" checked="checked" /></td>
                    </tr> 
                    <tr id="trAddNew">
                        <td class="title">Delete</td>
                        <td class="content"><input type="checkbox" id="ckbDelete" checked="checked" /></td>
                    </tr>
                    
                    <tr>
                       <td colspan="2">
                            <input type="button" id="btnSaveSchool" value="Save" />
                       </td> 
                    </tr>
                </table>
                <asp:Label ID="spResult" runat="server"></asp:Label>
            </div>
            <!-- End New -->

        </div>
</asp:Content>
